<?php

namespace app\services\portal;

use app\dao\portal\PortalSiteConfigurationDao;
use app\services\BaseService;
use think\db\Where;

class PortalSiteConfigurationService extends BaseService
{

    public function __construct(PortalSiteConfigurationDao  $dao)
    {
        $this -> dao  = $dao;
    }

    public function index(array $where)
    {
        return $this ->dao -> index($where);
    }

    public function createOrUpdate(array $where)
    {
        if ($where['id'] === 0){
            return $this ->dao ->create($where);
        }else{
            return $this ->dao ->updateDao($where);

        }
    }

}